<template>
	<view>
		<view style="padding-top: 30rpx;padding-bottom: 30rpx;padding-left: 20rpx;">请输入学信网验证码</view>
		<u-input style="width: 90%;margin: auto;" placeholder="学信网验证码" v-model="code"></u-input>
		<u-button style="margin-top: 30rpx;width: 80%;background-color: #fee2cc;" @click="submit">提交验证</u-button>
		
		<view style="width: 90%;padding-top: 30rpx;padding-left: 30rpx;">获取学信网验证码流程：</view>
		<view style="width: 90%;font-size: 25rpx;padding-left: 30rpx;">https://www.zhihu.com/question/274878474</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				code:""
			};
		},
		methods:{
			submit(){
				let form={}
				form.code=this.code
				let userinfo=uni.getStorageSync("userInfo")
				form.userid=userinfo.id
				
				this.$H.post("/information/add",form).then(res=>{
					if(res.code == 200){
					uni.showToast({
						icon: "none",
						title: '发布成功,等待管理员审核',
						
					})
					
					setTimeout(function () {
					                        uni.reLaunch({
					                        	url:'/pages/mine/index'
					                        })
					                    }, 2000);
					
					}else{
					uni.showToast({
						icon: "none",
						title: '提交失败，请重新操作'
					})
					}
				})
			}
		}
	}
</script>

<style lang="scss">

</style>
